<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*, com.librarySystem.entity.*"%>
<%@taglib prefix="s" uri="/struts-tags"%>    
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="${basePath}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">

.backgroundDiv { position: fixed; z-index: -1; top: 0; left: 0; right: 0; bottom: 0; background-image: url("picture/bg_step01.png");}
.backgroundDiv img { width: 100%; height: 100%;}

.registerDiv{
	position: fixed;
	left: 40%;
	top: 30%;
}

.registerDiv label{
	display: inline-block;
	width: 100px;	
	padding: 5px 0;
	text-align: right;
}
.userDiv input{
	width: 200px;
	hight: 60px;
}
#submit1,#reset1{
	margin-top:10px;
	margin-left:40px;
}
</style>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	$("#registerForm").submit(function() {
		if ($("#passWordAgain").val() != $("#passWord").val()) {
			if (!$("#passWordAgain").next().hasClass("error"))
				$("#passWordAgain").after("<a class='error' style='color: red;'>两次输入不一样</a>");
			return false;
		} else {
			$("#passWordAgain").next(".error").remove();
		}
	});
});
</script>
</head>
<body>
<body>
	<div class="backgroundDiv">
</div>
<div class="registerDiv">
	${ msg }
	<form id="registerForm" action="user/User_register" method="post"> 
		<label for="userName">用户名：</label>
		<input id="userName" name="user.userName" required="required"><br>
		<label for="passWord">密码：</label>
		<input id="passWord" name="user.passWord" type="password" required="required"><br>
		<label for="passWordAgain">确认密码：</label>
		<input id="passWordAgain" name="user.passWordAgain" type="password" required="required"><br>
		<input id="submit1" type="submit" value="确定" />
		<input id="reset1" type="reset" value="重置" />
	</form>
	
</div>
</body>
</html>